<?php

/*
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Library General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

namespace EasyActionPHP\Controller;

use EasyActionPHP\Core as Core;

/**
 * ActionForward.
 *
 * @author Flavio de Vasconcellos Correa
 * @since 2007/06/04
 * @package EasyActionPHP
 * @subpackage Controller
 * @version $id$
 * @license http://www.gnu.org/copyleft/gpl.html GPL
 */
class ActionForward extends Core\PBean {
    /**
     * @staticvar String valor 'SUCCESS'
     */

    const FORWARD_SUCCESS = 'SUCCESS';

    /**
     * @staticvar String valor 'FAILURE'
     */
    const FORWARD_FAILURE = 'FAILURE';

    /**
     * Construtor.
     *
     * @param String name
     * @param String path
     * @param Boolean redirect
     */
    function __construct($name, $path, $redirect = false, $fetch = false) {
        parent::__construct();
        $this->name = $name;
        $this->path = $path;
        $this->redirect = $redirect;
        $this->fetch = $fetch;
        $this->gets = array();
    }

    /**
     * Getter para a propriedade redirect.
     *
     * @access public
     * @return Boolean
     */
    public function isRedirect() {
        return ($this->redirect == true);
    }

    public function addGetParam($name, $value) {
        $this->gets[$name] = $value;
    }

}

?>